package chapter8.section2;

import chapter6.section4.Account;

//程序8-1b：验证AccountDataBase对List的封装
public class TestAccountDataBase {
	public static void main(String[] args) {
		AccountDataBase accountDB = new AccountDataBase();
		accountDB.add(new Account("1600394098", "张伟", 2000));
		accountDB.add(new Account("1600394099", "王国美", 3000));
		accountDB.add(new Account("1600394118", "丁理惠", 2300));
		Account result = accountDB.find("1600394099");
		if (result != null) {
			System.out.println("删掉了账户：" + result);
			accountDB.remove("1600394099");
		}
		System.out.println("当前剩余账户包括：");
		accountDB.print();
	}
}
